import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/abnormal/abnormal/list`,
      method: 'post',
      data
    })
  },
  // 创建异常单(WMS)
  create(data) {
    return request({
      url: `/v1/abnormal/abnormal/create`,
      method: 'post',
      data
    })
  },
  // 采购处理
  process(data) {
    return request({
      url: `/v1/abnormal/abnormal/purchase-process`,
      method: 'post',
      data
    })
  },
  // 计划确认
  planConfirm(data) {
    return request({
      url: `/v1/abnormal/abnormal/plan-confirm`,
      method: 'post',
      data
    })
  },
  // 仓库处理(WMS)
  warehouseProcess(data) {
    return request({
      url: `/v1/abnormal/abnormal/warehouse-process`,
      method: 'post',
      data
    })
  },
  // 完善补货信息
  replenishment(data) {
    return request({
      url: `/v1/abnormal/abnormal/update-replenishment`,
      method: 'post',
      data
    })
  },
  // 获取采购SKU数据(退款退款完结使用)
  getSku(params) {
    return request({
      url: `/v1/abnormal/abnormal/get-purchase-sku`,
      method: 'get',
      params
    })
  },
  // 物流服务商选项
  logistics(params) {
    return request({
      url: `/v1/purchase-config/logistics-config/get-logistics`,
      method: 'get',
      params
    })
  },
}
